// Copyright 2010 Google Inc. All Rights Reserved.

package com.google.zahra.webmanager;

import com.google.zahra.testmanager.TestManager;
import com.google.zahra.util.Util;
import com.google.zahra.workmanager.ZahraWorkManager;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author arthurkok@google.com (Your Name Here)
 *
 */

public class StatisticsServlet extends HttpServlet {

  static final ZahraWorkManager workManager = WebManager.WORK_MANAGER;
  static final TestManager testManager = WebManager.TEST_MANAGER;

  @Override
  protected void doGet(HttpServletRequest request, HttpServletResponse response)
      throws IOException {

    response.setContentType("text/html");
    response.setStatus(HttpServletResponse.SC_OK);

    String clearFlag = request.getParameter("clear");
    int page =
        request.getParameter("page") == null ? 0 : Integer.parseInt(request.getParameter("page"));
    StringBuffer bodyString = new StringBuffer();

    bodyString.append("<h2>Statistics</h2>");


    response.getWriter().print(Util.getHTML(bodyString.toString(), "Zahra - All Tests"));
  }
}
